package com.ldx.blog.pojo.response;

import com.ldx.blog.pojo.dataobject.UserInfo;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class UserInfoResponse {
    private Integer id;
    private String userName;
    private String githubUrl;

    public static UserInfoResponse trans(UserInfo userInfo){
        UserInfoResponse userInfoResponse = new UserInfoResponse();
        BeanUtils.copyProperties(userInfo,userInfoResponse);
        return userInfoResponse;
    }
}
